<div>
    <form method="post">
        <input type="hidden" name="id" value="{$id}">
        <table class="t2 t3">
            <tr><th>上级分类：</th><td>
                <select name="pid">
                    <option value="0">顶级分类</option>
                    <foreach name="category" item="v">
                        <option value="{$v.id}" <eq name="v.id" value="$pid">selected</eq> >{:str_repeat('— ',$v['level'])}{$v.name}</option>
                    </foreach>
                </select>
            </td></tr>
            <tr><th>分类名称：</th><td><input type="text" name="name" value="{$name}"></td></tr>
        </table>
        <div>
            <input type="submit" value="修改分类">
            <input type="reset" value="重新填写">
        </div>
    </form>
</div>